<?php

namespace Database\Factories;

use App\Helpers\Faker;
use App\Models\Enterprise;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ESStation>
 */
class ESStationFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        $data = Faker::zone_address();
        return [
            'name' => $this->faker->unique()->companyPrefix(),
            'zone' =>  $data['zone'], 
            'address' => $data['address'],        
            'director' => $this->faker->name(),
            'mobile' => $this->faker->unique()->phoneNumber(),               
            'remarks' => '备注',
            'enterprise_id' =>  $this->faker->randomElement(Enterprise::all()->pluck('id')),
        ];
    }
}
